<?php
namespace app\validate;

use think\Validate;

class LoginValidate extends  Validate{
    protected $rule =   [
        'mobile'  =>['require', 'mobile', 'regex' => '/^1[34578]\d{9}$/'],
        'password'   => 'require|max:30',
        'captcha_value' => 'require|max:10',
        'captcha_id'=>'require',
    ];

    protected $message  =   [
        'mobile.require' => '手机号不能为空',
        'mobile.regex' => '手机号格式不正确',
        'password.require'     => '密码不能为空',
        'captcha_value.require'   => '验证码不能为空',
        'captcha_id.require'   => '验证码id不能为空',
    ];
}